#$Id$
# Maintainer: Jan De Groot <jgc@archlinux.org>

pkgname=gnome-keyring
pkgver=3.20.0+57+g9db67ef6
pkgrel=1
epoch=1
pkgdesc="Stores passwords and encryption keys"
url="https://wiki.gnome.org/Projects/GnomeKeyring"
arch=(i686 x86_64)
license=(GPL LGPL)
depends=(gcr libcap-ng pam)
makedepends=(intltool gtk-doc gnome-common git python)
groups=('gnome')
install=gnome-keyring.install
_commit=9db67ef6e39ac51d426dee91da3b9305670241e6  # master
source=("git+https://git.gnome.org/browse/gnome-keyring#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd "$pkgname"
  ./configure --prefix=/usr --sysconfdir=/etc \
      --localstatedir=/var --disable-static \
      --libexecdir=/usr/lib/gnome-keyring \
      --with-pam-dir=/usr/lib/security --with-root-certs=/etc/ssl/certs \
      --disable-schemas-compile
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
}
